<%@ page language="java" contentType="text/html; charset=UTF-8"  pageEncoding="UTF-8"%>
$(function(){
	$("#saveButton").click(function(){
		var releasePeople = $("#releasePeople").val();
		var college = $("#college").val();
		var releasePeopleId = $("#releasePeopleId").val();
		var title = $("#title").val();
		var content = $("#content").val();
		if(releasePeople!="" && college!="" && releasePeopleId!="" && title!="" && content!=""){
			$.messager.confirm({
				title:'提示',
				msg:'确认发布吗?',
				top:30,
				fn:function(r){
					if(r){
						$.ajax({
							type:'POST',
							url:'somethingLostInster.action',
							data:{releasePeople:releasePeople,college:college,releasePeopleId:releasePeopleId,title:title,content:content},
							datatype:'json',
							success:function(msg){
								if(msg.status == "200"){
									window.location.href="somethingLostListDatagrid.action";  
								}else{
									$.messager.alert("提示","发布失败");
								}
							}
						});
					}
				}
			});
		}
	});
});

